_clearDragPlaceholder: function() {
if (this._dragPlaceholder) {
+ this._animatingPlaceholdersCount++;
this._dragPlaceholder.animateOutAndDestroy();
+ this._dragPlaceholder.connect('destroy',
+ Lang.bind(this, function() {
+ this._animatingPlaceholdersCount--;
+ }));
this._dragPlaceholder = null;
}
this._dragPlaceholderPos = -1;
// Don't allow positioning before or after self
if (favPos != -1 && (pos == favPos || pos == favPos + 1)) {
- if (this._dragPlaceholder) {
- this._dragPlaceholder.animateOutAndDestroy();
- this._animatingPlaceholdersCount++;
- this._dragPlaceholder.connect('destroy',
- Lang.bind(this, function() {
- this._animatingPlaceholdersCount--;
- }));
- }
- this._dragPlaceholder = null;
-
+ this._clearDragPlaceholder();
return DND.DragMotionResult.CONTINUE;
}